import request from '@/router/axios';
import {
        formateTime
    } from '../util/date';
export const list = (data) => request({
    url: '/search-keywords/list',
    method: 'post',
    data
}).then(data=>{
    data = data || {};
    data.rows && data.rows.forEach(item=>{
item.create_time=formateTime(item.create_time);
item.modify_time=formateTime(item.modify_time);
});
    return data;
});
export const create = (data) => request({
    url: '/search-keywords/create',
    method: "post",
    data
});
export const update = (data) => request({
    url: '/search-keywords/update',
    method: "post",
    data
});
export const remove = (id) => request({
    url: '/search-keywords/delete',
    method: "post",
    data:{
        id: Array.isArray(id) ? id : [id]
    }
});